package com.demo.boot.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import com.demo.boot.bean.User;
import com.demo.boot.repositories.UserRepository;

@Component
public class UserService {

	@Autowired
	private UserRepository userRepository;
	
	public User getUserByName(String name){
		return userRepository.getUserByName(name);
	}
	
	public List<User> findAll(){
		return userRepository.findAll();
	}
	
}
